﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Reflection;
using LinFu.IoC.Configuration;

namespace CoreEx.DynamicInvoker.Implementation
{
    [Implements(typeof(IDynamicFactory<FieldInfo>),LifecycleType.OncePerRequest,ServiceName = "FieldGetterFactory")]
    public class FieldGetterFactory : FieldFactoryBase
    {
        protected override void EmitMethodBody(ILGenerator ilGenerator, FieldInfo target)
        {            
            ilGenerator.Emit(OpCodes.Ldfld, target);
        }

        public override IEnumerable<Type> GetParameters(FieldInfo member)
        {
            return new List<Type>();
        }
    }
}
